package com.shtel.bss.saas.tenant.manager;

import com.github.pagehelper.PageInfo;
import com.shtel.bss.saas.tenant.entity.SysUser;

/**
 * 用户表管理
 *
 * @author xiezhiwei 2020-02-05 22:27
 */
public class SysUserManager {

    /**
     * 查询用户列表
     */
    public static PageInfo<SysUser> selectEntity(SysUser sysUser, int pageNum, int pageSize) {
        return SysUser.repository().selectEntity(sysUser, pageNum, pageSize);
    }

    /**
     * 查询用户
     */
    public static SysUser selectOne(SysUser sysUser) {
        return SysUser.repository().selectOne(sysUser);
    }

    /**
     * 保存用户
     */
    public static void saveEntity(SysUser sysUser) {
        SysUser.repository().save(sysUser);
    }

    /**
     * 修改用户
     */
    public static void updateEntity(SysUser sysUser) {
        SysUser.repository().update(sysUser);
    }

    /**
     * 删除用户
     */
    public static void removeEntity(SysUser sysUser) {
        SysUser.repository().remove(sysUser);
    }

    public static SysUser selectByAccount(String account){
        return SysUser.repository().selectByAccount(account);
    }
}